package com.fantabest.common.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.NullValue;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Season implements Serializable {

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;
	@Persistent(nullValue = NullValue.EXCEPTION)
	private String title;
	@Persistent
	private String description;
	@Persistent(nullValue = NullValue.EXCEPTION)
	private Date start;
	@Persistent(nullValue = NullValue.EXCEPTION)
	private Date end;
//	@Persistent(mappedBy = "season")
	@Persistent
	private List<Player> playersList;
	@Persistent(mappedBy = "season")
	private List<Team> teamsList;
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public Date getStart() {
		return start;
	}
	public void setStart(Date start) {
		this.start = start;
	}
	public Date getEnd() {
		return end;
	}
	public void setEnd(Date end) {
		this.end = end;
	}
	public List<Player> getPlayersList() {
		return playersList;
	}
	public void setPlayersList(List<Player> playersList) {
		this.playersList = playersList;
	}
	public List<Team> getTeamsList() {
		return teamsList;
	}
	public void setTeamsList(List<Team> teamsList) {
		this.teamsList = teamsList;
	}
	
	
}
